projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d69d95
)
stylecontext: Don't crash when colors are "none"
author
Benjamin Otte
<otte@redhat.com>
Fri, 27 May 2011 21:58:10 +0000
(23:58 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Thu, 2 Jun 2011 00:03:51 +0000
(
02:03
+0200)
Instead, use their default value (pink).
gtk/gtkstylecontext.c
patch
|
blob
|
history
diff --git
a/gtk/gtkstylecontext.c
b/gtk/gtkstylecontext.c
index b93dc367cacaef120e61b3e0fcd9821a3e96ad33..d0ab18b21a64f059efe52b55e0f08b6b53f122ef 100644
(file)
--- a/
gtk/gtkstylecontext.c
+++ b/
gtk/gtkstylecontext.c
@@
-3369,7
+3369,10
@@
gtk_style_context_get_color (GtkStyleContext *context,
if (value)
{
c = g_value_get_boxed (value);
- *color = *c;
+ if (c)
+ *color = *c;
+ else
+ gdk_rgba_parse (color, "pink");
}
}
@@
-3410,7
+3413,10
@@
gtk_style_context_get_background_color (GtkStyleContext *context,
if (value)
{
c = g_value_get_boxed (value);
- *color = *c;
+ if (c)
+ *color = *c;
+ else
+ gdk_rgba_parse (color, "pink");
}
}
@@
-3451,7
+3457,10
@@
gtk_style_context_get_border_color (GtkStyleContext *context,
if (value)
{
c = g_value_get_boxed (value);
- *color = *c;
+ if (c)
+ *color = *c;
+ else
+ gdk_rgba_parse (color, "pink");
}
}